<%@page import="RssEasy.Core.CookieHelper"%>
<%@page import="java.net.CookieHandler"%>
<%@page import="Model.Purchase.PurchaseOfferList"%>
<%@page import="Model.Purchase.PurchaseListView"%>
<%@page import="Model.Purchase.PurchaseMaterielList"%>
<%@page import="RssEasy.Core.HttpRequestHelper"%>
<%@page import="Model.Purchase.PurchaseList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
    PurchaseListView plv = new PurchaseListView(pageContext);
    HttpRequestHelper hrh = new HttpRequestHelper(pageContext).request();
    PurchaseMaterielList pml = new PurchaseMaterielList(pageContext);
    PurchaseOfferList pol = new PurchaseOfferList(pageContext);
    CookieHelper cookie = new CookieHelper(request, response);
    String level = cookie.Get("level");
    String myid;
    if (level.equals("0")) {
        myid = cookie.Get("myid");
    } else {
        myid = cookie.Get("level");
    }
%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>企企通-询价比-我参与的</title>
        <meta name="description" content="这里写网站内容描述" />
        <meta name="keywords" content="这里写关键词" />
        <meta name="Robots" contect="all">
        <link href="/css/reset.css" rel="stylesheet" type="text/css" />
        <link href="css/participate.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <h1>询价比管理</h1>
        <div id="detailsBox">
            <%
                plv.select().where("id=?", hrh.get("purchaseid")).get_first_rows();
            %>
            <h2>参与项目：<%=plv.get("name")%></h2>
            <table>
                <tr><td>报名截止时间：</td><td rssdate="<%=plv.get("enddt")%>,yyyy-MM-dd hh:mm"></td></tr>
                <tr><td>项目名称：</td><td><%=plv.get("name")%></td></tr>
                <tr><td>项目类别：</td><td purchase="<%=plv.get("purchase_class")%>"></td></tr>
                <tr><td>产品类别：</td><td><%=plv.get("business_class")%></td></tr>
                <tr><td>联系人：</td><td><%=plv.get("linkname")%></td></tr>
                <tr class="line"><td>联系电话：</td><td><%=plv.get("phone")%></td></tr>
                <tr class="line">
                    <td>项目简介：</td>
                    <td><%=plv.get("summary")%></td>
                </tr>
                <tr class="line">
                    <td>供应商资格：</td>
                    <td><%=plv.get("conditions")%></td>
                </tr>
            </table>
            <div id="particulars">
                <h3>详情参数</h3>
                <table>
                    <tr>
                        <td>序号</td>
                        <td>物料名称</td>
                        <td>规格型号</td>
                        <td>数量</td>
                        <td>单位</td>
                        <td>到货日期</td>
                        <td>图片</td>
                    </tr>
                    <%
                        pml.select().where("purchaseid=?", hrh.get("purchaseid")).get_page_desc("id");
                        int i = 1;
                        while (pml.for_in_rows()) {
                    %>
                    <tr>
                        <td><%=i%></td>
                        <td><%=pml.get("materielname")%></td>
                        <td><%=pml.get("model")%></td>
                        <td><%=pml.get("amout")%></td>
                        <td><%=pml.get("unit")%></td>
                        <td rssdate="<%=pml.get("delivery_date")%>,yyyy-MM-dd"></td>
                        <td><img src="/upfile/<%=pml.get("attachurl")%>"/></td>
                    </tr>
                    <%
                            i++;
                        }%>
                </table>
            </div>
            <%
                pol.select().where("myid=? and purchaseid=?", myid, hrh.get("purchaseid")).get_first_rows();
            %>
            <p myresult="<%=pol.get("result")%>"></p>
        </div>
        <%@include file="/inc/js_all.html" %>
        <script type="text/javascript" src="js/participate.js"/></script>
    <script src="/purchase/js/dictdata.js" type="text/javascript"></script>
</body>
</html>
